-- GENERATED SPELL FOR [Prophetess Cavrylin] --


function spell0_20683(pUnit, Event) --@Chaos Nova,Self--
pUnit:FullCastSpellOnTarget(37997,pUnit)
pUnit:RegisterEvent('Sorts_20683', 14000, 1)
end

function spell1_20683(pUnit, Event) --@Launch,n/a--
pUnit:FullCastSpellOnTarget(36656,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20683', 535, 1)
end

function spell2_20683(pUnit, Event) --@Melt Flesh,n/a--
pUnit:FullCastSpellOnTarget(37629,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20683', 17000, 1)
end

function Sorts_20683(pUnit, Event)
local choix_sorts_20683 = math.random(0, 2)
if choix_sorts_20683 == 0 then
pUnit:RegisterEvent('spell0_20683', 1, 1)
end
if choix_sorts_20683 == 1 then
pUnit:RegisterEvent('spell1_20683', 1, 1)
end
if choix_sorts_20683 == 2 then
pUnit:RegisterEvent('spell2_20683', 1, 1)
end
end

function mob20683_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20683', math.random(1500, 3000), 1)
end

function mob20683_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20683_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20683_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20683, 1, 'mob20683_Action')
RegisterUnitEvent(20683, 2, 'mob20683_Leave')
RegisterUnitEvent(20683, 3, 'mob20683_Kill')
RegisterUnitEvent(20683, 4, 'mob20683_Die')
